package com.hspedu.newData.dmsxl.字符串;
/**
 * @Author: yh
 * @description: 
 * @CreateTime: 2025-04-22 
 * @Version: 1.0
 */

public class LC344反转字符串 {

    public void reverseString(char[] s) {
        int left = 0;
        int right = s.length - 1;

        while(left <= right){
            char temp = s[left];
            s[left] = s[right];
            s[right] = temp;
            left++;
            right--;
        }
    }
}
